#ifndef __MESSAGE_BOX_LAYER_H__
#define __MESSAGE_BOX_LAYER_H__
#include "cocos2d.h"
#include "cocos-ext.h"

namespace gofgame {
	namespace jumpdown {
		namespace layer {
			class MessageBoxLayer : public cocos2d::CCLayerColor ,public cocos2d::extension::CCEditBoxDelegate{
			public:
				virtual bool init();
				static MessageBoxLayer *createMessageBoxLayer();
				MessageBoxLayer();
			private:
				void initUI();
				void initData();

				cocos2d::CCMenu *m_pMenu;
				std::string m_username;
				std::string m_tipStr;
				int m_level;
				int m_rank;
				bool m_bTouchedMenu;

				void okMenuItemCallBack(cocos2d::CCObject *pSender);  
				void restartMenuItemCallback(cocos2d::CCObject *pSender);  
				void listMenuItemCallback(cocos2d::CCObject *pSender); 

				void onEnter();
				void onExit();
				virtual bool ccTouchBegan(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);  
				virtual void ccTouchMoved(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);  
				virtual void ccTouchEnded(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);  
				virtual void ccTouchCancelled(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent); 

				virtual void editBoxReturn(cocos2d::extension::CCEditBox* editBox);

			};
		}
	}
}

#endif //__MESSAGE_BOX_LAYER_H__
